CC = gcc
COMPILERFLAGS = -Wall
INCLUDE = -I/usr/include/
CFLAGS = $(COMPILERFLAGS) $(INCLUDE)
LIBDIR  = -L/usr/X11R6/lib 
LIBRARIES = -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm -pthread `sdl-config --libs --cflags `

PROGRAM: main.c
	$(CC) $(CFLAGS) -o $@ $(LIBDIR) $< $(LIBRARIES)  
	./PROGRAM